package com.kmxd.ams.infra.arrange.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.kmxd.ams.core.common.field.ExtField;
import com.kmxd.ams.infra.arrange.base.SystemBO;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 项目级 // @TableName("f1_1_project")
 *
 * @author ZuoLG
 * @since 2022-07-20
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "项目级")
@ToString(callSuper = true)
@TableName("f0_0_project")
public class Project extends SystemBO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "项目代号")
  private String projCode;

  @Schema(description = "项目名称")
  private String title;

  @Schema(description = "备注")
  private String remarks;

  @Schema(description = "年度")
  @JsonSerialize(using = ToStringSerializer.class)
  @TableField(updateStrategy = FieldStrategy.IGNORED)
  private Integer year;

  @Schema(description = "保管期限")
  @TableField(updateStrategy = FieldStrategy.IGNORED)
  private String retentionPeriod;

  @Schema(description = "密级")
  @TableField(updateStrategy = FieldStrategy.IGNORED)
  private String security;

  @Schema(description = "历史状态(发起移交等需临时修改status状态操作时，使用此字段备份status)")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long historyStatus;

  @Schema(description = "整理规则id")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archRuleId;

  @Schema(description = "数字扩展字段1")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExtField(value = "ext_int1", jdbcType = JdbcType.BIGINT, length = 11)
  private Integer extInt1;

  @Schema(description = "数字扩展字段2")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExtField(value = "ext_int2", jdbcType = JdbcType.BIGINT, length = 11)
  private Integer extInt2;

  @Schema(description = "数字扩展字段3")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExtField(value = "ext_int3", jdbcType = JdbcType.BIGINT, length = 11)
  private Integer extInt3;

  @Schema(description = "数字扩展字段4")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExtField(value = "ext_int4", jdbcType = JdbcType.BIGINT, length = 11)
  private Integer extInt4;

  @Schema(description = "数字扩展字段5")
  @JsonSerialize(using = ToStringSerializer.class)
  @ExtField(value = "ext_int5", jdbcType = JdbcType.BIGINT, length = 11)
  private Integer extInt5;

  @Schema(description = "日期扩展字段1")
  @ExtField(value = "ext_date1", jdbcType = JdbcType.TIME)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMdd")
  @DateTimeFormat(pattern = "yyyyMMdd")
  private Date extDate1;

  @Schema(description = "日期扩展字段2")
  @ExtField(value = "ext_date2", jdbcType = JdbcType.TIME)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMdd")
  @DateTimeFormat(pattern = "yyyyMMdd")
  private Date extDate2;

  @Schema(description = "日期扩展字段3")
  @ExtField(value = "ext_date3", jdbcType = JdbcType.TIME)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMdd")
  @DateTimeFormat(pattern = "yyyyMMdd")
  private Date extDate3;

  @Schema(description = "日期扩展字段4")
  @ExtField(value = "ext_date4", jdbcType = JdbcType.TIME)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMdd")
  @DateTimeFormat(pattern = "yyyyMMdd")
  private Date extDate4;

  @Schema(description = "日期扩展字段5")
  @ExtField(value = "ext_date5", jdbcType = JdbcType.TIME)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyyMMdd")
  @DateTimeFormat(pattern = "yyyyMMdd")
  private Date extDate5;

  @Schema(description = "字符扩展字段1")
  @ExtField(value = "ext_str1", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr1;

  @Schema(description = "字符扩展字段2")
  @ExtField(value = "ext_str2", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr2;

  @Schema(description = "字符扩展字段3")
  @ExtField(value = "ext_str3", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr3;

  @Schema(description = "字符扩展字段4")
  @ExtField(value = "ext_str4", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr4;

  @Schema(description = "字符扩展字段5")
  @ExtField(value = "ext_str5", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr5;

  @Schema(description = "字符扩展字段6")
  @ExtField(value = "ext_str6", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr6;

  @Schema(description = "字符扩展字段7")
  @ExtField(value = "ext_str7", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr7;

  @Schema(description = "字符扩展字段8")
  @ExtField(value = "ext_str8", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr8;

  @Schema(description = "字符扩展字段9")
  @ExtField(value = "ext_str9", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr9;

  @Schema(description = "字符扩展字段10")
  @ExtField(value = "ext_str10", jdbcType = JdbcType.VARCHAR, length = 64)
  private String extStr10;

  @Schema(description = "案卷统计-待整理")
  @JsonSerialize(using = ToStringSerializer.class)
  @TableField(exist = false)
  private Long volTotalArrange;

  @Schema(description = "案卷统计-归档")
  @JsonSerialize(using = ToStringSerializer.class)
  @TableField(exist = false)
  private Long volTotalArchive;

  @Schema(description = "散文件-待整理")
  @JsonSerialize(using = ToStringSerializer.class)
  @TableField(exist = false)
  private Long scatteredDocTotal;
}
